package main

import (
	"gin-meilisearch-student/controllers"
	"github.com/gin-gonic/gin"
)

func main() {
	r := gin.Default()
	api := r.Group("/api/v1")
	{
		api.POST("/students", controllers.AddStudent)
		api.GET("/students/:id", controllers.GetStudent)
		api.GET("/students", controllers.GetAllStudents)
		api.PUT("/students/:id", controllers.UpdateStudent)
		api.DELETE("/students/:id", controllers.DeleteStudent)
	}
	//     "id": "2",

	r.Run(":8080")
}
